package com.wgb.movie.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.wgb.movie.model.dto.movieOrder.MovieOrderQueryRequest;
import com.wgb.movie.model.entity.MovieOrder;
import com.wgb.movie.model.vo.MovieOrderVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 订单服务
 *
 * @author <a href="https://github.com/liyupi">程序员鱼皮</a>
 * @from <a href="https://www.code-nav.cn">编程导航学习圈</a>
 */
public interface MovieOrderService extends IService<MovieOrder> {

    /**
     * 校验数据
     *
     * @param movieOrder
     * @param add 对创建的数据进行校验
     */
    void validMovieOrder(MovieOrder movieOrder, boolean add);

    /**
     * 获取查询条件
     *
     * @param movieOrderQueryRequest
     * @return
     */
    QueryWrapper<MovieOrder> getQueryWrapper(MovieOrderQueryRequest movieOrderQueryRequest);
    
    /**
     * 获取订单封装
     *
     * @param movieOrder
     * @param request
     * @return
     */
    MovieOrderVO getMovieOrderVO(MovieOrder movieOrder, HttpServletRequest request);

    /**
     * 分页获取订单封装
     *
     * @param movieOrderPage
     * @param request
     * @return
     */
    Page<MovieOrderVO> getMovieOrderVOPage(Page<MovieOrder> movieOrderPage, HttpServletRequest request);
}
